<?php
/*
	插件概览
*/
defined('BY_JYA') or exit('error');
$_RQ['op']=$_RQ['op']?$_RQ['op']:'get';
if($_RQ['op']=='get'){
	//显示统计数据
	$daytime = mktime(0,0,0,date('m'),date('d'),date('Y'));
	if($_SESSION['storeids']){
		$new['dingjin']=pdo_count('jy_yxw_infee_log',array('type'=>2,'storeid'=>$_SESSION['storeids'],'uniacid'=>$_SESSION['uniacid'],'status'=>0));
		$new['buygoods']=pdo_count('jy_yxw_infee_log',array('type'=>1,'storeid'=>$_SESSION['storeids'],'uniacid'=>$_SESSION['uniacid'],'status'=>0));
		$new['fenfee']=pdo_count('jy_yxw_fenfee_log',array('status'=>0,'storeid'=>$_SESSION['storeids'],'uniacid'=>$_SESSION['uniacid']));
		$new['tuifee']=pdo_count('jy_yxw_tuifee_log',array('status'=>1,'storeid'=>$_SESSION['storeids'],'uniacid'=>$_SESSION['uniacid']));
	}else{
		$new['dingjin']=pdo_count('jy_yxw_infee_log',array('type'=>2,'uniacid'=>$_SESSION['uniacid'],'status'=>0));
		$new['buygoods']=pdo_count('jy_yxw_infee_log',array('type'=>1,'uniacid'=>$_SESSION['uniacid'],'status'=>0));
		$new['fenfee']=pdo_count('jy_yxw_fenfee_log',array('status'=>0,'uniacid'=>$_SESSION['uniacid']));
		$new['tuifee']=pdo_count('jy_yxw_tuifee_log',array('status'=>1,'uniacid'=>$_SESSION['uniacid']));
	}
	$htmls=array(
		array('type'=>'data','num'=>12,'one_num'=>3,'title'=>'总数据','datas'=>array(
			array('title'=>'待定金用户数','data'=>$new['dingjin']),
			array('title'=>'待成交用户数','data'=>$new['buygoods']),
			array('title'=>'应收账款用户数','data'=>$new['fenfee']),
			array('title'=>'待退费审批数','data'=>$new['tuifee']),
		)),
	);
	$return['htmls']=$htmls;
	exi($return);
}